<include file="Public:header"/>
<div class="top_title">
	<h1 class="tc">{$info['title']}</h1>
</div>

<form action="{:U('step', array('agreement_id' => $agreement_id, 'step' => $next_step))}" method="post">
<section class="bd">		
	<div class="custom_made">
		<div class="block">
			<h2>{$step_info['step_title']}</h2>
			<div class="content">
				<volist name="ask_data" id="rs">
					<div class="row">
						<h3 class="title">{$rs['title']}</h3>
						<php>
							$list = explode(PHP_EOL, $rs['content']);
						</php>
						<switch name="rs.type" >
							<case value="text">
								<input type="text" name="answer[{:md5($rs['name'])}]" value="{$cache_answer[md5($rs['name'])]|default=$rs['content']}" class="text"/>
							</case>
							<case value="textarea">
								<textarea class="text" name="answer[{:md5($rs['name'])}]" style="height: 100px;">{$cache_answer[md5($rs['name'])]|default=$rs['content']}</textarea>
							</case>
							<case value="radio">
								<volist name="list" id="val">
									<label>
										<input type="radio" name="answer[{:md5($rs['name'])}]" value="{$val}" <eq name="val" value="$cache_answer[md5($rs['name'])]">checked</eq> />
										{$val}
									</label>
								</volist>
							</case>
							<case value="checkbox">
								<volist name="list" id="val">
									<php>
										$is_checked = in_array($val, $cache_answer[md5($rs['name'])]);
									</php>
									<label>
										<input type="checkbox" name="answer[{:md5($rs['name'])}][]" value="{$val}" <eq name="is_checked" value="1">checked</eq> />
										{$val}
									</label>
								</volist>
							</case>
							<case value="select">
								<select name="answer[{:md5($rs['name'])}]">
									<volist name="list" id="val">
										<option value="{$val}" <eq name="val" value="$cache_answer[md5($rs['name'])]">selected</eq>>{$val}</option>
									</volist>
								</select>
							</case>
							<case value="description">
									
							</case>
							<default />
								<input type="text" name="answer[{:md5($rs['name'])}]" value="{$cache_answer[md5($rs['name'])]|default=$rs['content']}" class="text" />
						</switch>
					</div>
				</volist>
			</div>
		</div>
		<input type="submit" name="" value="下一步" class="btn btn_made" />
	</div>
</section>
</form>

<include file="Public:footer"/>